package csc.daonjpa.java.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import csc.daonjpa.java.dao.AccountDAO;
import csc.daonjpa.java.domain.Account;

/**
 * Business service class.
 * @author tnguyen256
 *
 */
public class BankService {
	
	private AccountDAO accountDAO;
	
	public AccountDAO getAccountDAO() {
		return accountDAO;
	}

	@Autowired
	public void setAccountDAO(AccountDAO accountDAO) {
		this.accountDAO = accountDAO;
	}

	public void addAccount(Account account) {
		accountDAO.addAccount(account);
	}

	public List<Account> getAccounts() {
		return accountDAO.getAccounts();
	}
	
}
